function book(bookName){
	
	this.bookName = bookName || "";
	this.versionEngine = $('#version-engine').text() || "";
	this.iOSDevice = deviceController.iOSDevice;
	this.mainBgMusic = getFileName('bg-music');
	this.btnPrevImage = getFileName('prev-scene-icon');
	this.btnNextImage = getFileName('next-scene-icon');
	this.openingScene = $('#opening-scene').data("kendoDropDownList").value() || "";
	//this.showBoundingBox = false;
	
	function getFileName(inputName){
		
		var path = $.trim( $('#'+inputName).val() );
		if (path != "" && path.lastIndexOf('\\') != -1){
			path = path.substring(path.lastIndexOf('\\')+1);
		}
		
		return path;
	}
	
	
	/*
	 *  scene constructor
	 */
	function scene(){
		
		this.showNextBtn = true;
		this.showPrevBtn = true;
		this.batchNodes = {};
		
		/*
		 *  actor constructor
		 */
		function actor(){
			
			function action(){
				
				this.name = "";
				this.type = "";
				
				return this;
			}
			
			function sequence(p_event){
				
				this.event = p_event;
				this.name = "secuencia";
				this.type = "DDSequence";
				this.sequenceActions = []; 
			}
			
			function _addAction(p_sequence, p_action){
			
				var newAction = new action();
				this.actions[p_sequence].sequenceActions.push(newAction);		
				return newAction
			}
			
			function _addSequence(p_pos, p_firstAction, repeatSequence){
				
				if (!this.actions){
					this.actions = {};
				}
				
				var sequenceEvent = getSequenceEvent(p_firstAction);
				
				var newSequence = new sequence(sequenceEvent);
				var sequenceName = 'sequence'+p_pos
				this.actions[sequenceName] = newSequence;
				this.actions[sequenceName].repeat = repeatSequence;
				return sequenceName;
			}
			
			function getSequenceEvent(a){
				
				if (a.state && a.state != "Default"){
					return "" + a.event + "{" + a.state + "}"
				}
				else {
					return "" + a.event
				}
			}
			

			function _addChildren(actorName, where){
				
				if (actorName){
					var newActor = {};
					newActor[actorName] = new actor();
					if (!this.children){
						this.children = [];
					}
					this.children.push(newActor);
					
					return newActor[actorName];
				}
				else {
					console.log('BOOK.JS: error in _addActor()')
					return false;
				}
			}
			
			this.rotation = "";
			this.draggable = false;
			this.touchable = false;
			this.initState = "";
			this.type = "";
			this.zindex = "";
			this.position = "";
			this.scale = "";
			this.anchor = "0,0"
			this.group = "Default";
			this.opacity = "1";
			
			this.addActor = _addChildren;
			this.addAction = _addAction;
			this.addSequence = _addSequence;
			return this;
		}//end actor constructor
		
		function _addActor(actorName, where){
			
			if (actorName){
				var newActor = {};
				newActor[actorName] = new actor();
				if (!this.bookObjects){
					this.bookObjects = [];
				}
				this.bookObjects.push(newActor);
				
				return newActor[actorName];
			}
			else {
				console.log('BOOK.JS: error in _addActor()')
				return false;
			}
		}
		
		
		this.addActor = _addActor;
		return this;
	}//end scene constructor
	
	
	function _addScene(sceneName){
		
		if (sceneName){
			
			var newScene = {};
			newScene[sceneName] = new scene();
			if(!this.scenes){
				this.scenes = [];
			}
			this.scenes.push (newScene);
			
			return newScene[sceneName]
		}
		else {
			console.log('BOOK.JS: error in _addScene()')
			return false;	
		}
	}
	
	this.addScene = _addScene;
	return this;
}